package com.ethan.mvpdemo.module.login;

import com.ethan.mvpdemo.comm.http.CallBack;

/**
 * @Description:
 * @Author ethan
 * @CreateDate: 2021/12/7 10:17
 * @UpdateDate: 2021/12/7 10:17
 * @Version 1.0
 */
class LoginPresenter {
    LoginContract.ILoginModel loginModel;
    LoginContract.IView iView;

    public LoginPresenter(LoginContract.IView iView) {
        this.iView = iView;
        loginModel = new LoginModel();
    }
    public void login(String name,String pwd){
        loginModel.login(name, pwd, new CallBack() {
            @Override
            public void success() {
                iView.loginSuccess();
            }
            @Override
            public void fail() {
                iView.loginFail();
            }
        });

    }
}
